import 'package:flutter/material.dart';
import 'package:flutter_app/controller/MenuController.dart';
import 'package:flutter_app/page/SlideLeftMenuWidget.dart';
import 'package:get/get.dart';

import 'ContentWidget.dart';
import 'HeadWidget.dart';

class HomePage extends StatefulWidget {
  @override
  _HomePageState createState() => _HomePageState();
}

MenuController _menuController = Get.put(MenuController());

class _HomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      key: _menuController.homeScaffoldKey,
      backgroundColor: Colors.grey[200],
      //侧拉页面
      drawer: SlidLeftMenuWidget(),
      //填充布局
      body: SingleChildScrollView(
        child: Column(
          children: [
            //第一部分的标题
            HeadWidget(),
            //第二部分的内容
            Container(
              child: ContentWidget(),
              //最大宽度
              constraints: BoxConstraints(maxWidth: 1000),
            ),
          ],
        ),
      ),
    );
  }
}
